package com.example.springboot_shiro.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.springboot_shiro.entity.Account;
import com.example.springboot_shiro.mapper.AccountMapper;
import com.example.springboot_shiro.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AccountServiceImpl implements AccountService {

  @Autowired
  private AccountMapper accountMapper;

  @Override
  public Account findByName(String username) {
    QueryWrapper wrapper = new QueryWrapper();
    wrapper.eq("username",username);
    return accountMapper.selectOne(wrapper);
  }
}
